<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        class Animal{
            constructor(name){
                this.name = name;
            }
            eat(){
                console.log(`${this.name} is eating`);
            }
        }
        class Dog extends Animal{
            drink(){
                console.log(`${this.name} is drink`);
            }
        }
        let dog = new Dog('kim')
        dog.drink();
        dog.eat();
    </script>
</body>
</html>